package be.bonamis.umpire.quiz;

import java.io.Serializable;

public class PersonResult implements Serializable, Comparable<PersonResult> {
	private static final long serialVersionUID = 5405574280994369192L;
	private String fullName;
	private Integer score;

	public String getFullName() {
		return fullName;
	}

	public void setFullName(String fullName) {
		this.fullName = fullName;
	}

	public Integer getScore() {
		return score;
	}

	public void setScore(Integer score) {
		this.score = score;
	}

	@Override
	public int compareTo(PersonResult obj) {
		int prComp = score.compareTo(obj.getScore());
		return ((prComp == 0) ? obj.getFullName().compareTo(fullName) : prComp);
	}
}
